jQuery.loadStart = function (paramters){
	var loadingText = paramters&&paramters.text?paramters.text:"Loading...";
	var idStr = paramters&&paramters.id?paramters.id:null;
	if (idStr!=null){
		loadingText = $('#'+idStr).html();
	}
	var coverHtml = "<div class='i-loading-cover i-loading-closable'></div>";
	$(document.body).append(coverHtml);
	$(".i-loading-cover").css("height",$(document).height());
	$(".i-loading-cover").css("width",$(document).width());
	$(window).scroll(function(){
		$(".i-loading-cover").css("height",$(document).height());
		$(".i-loading-cover").css("width",$(document).width());
	});
	
	$(document.body).append("<div class='i-loading-box i-loading-closable'>"+loadingText+"</div>");
	var html = $('.i-loading-box');
	html.css("top",$(document).scrollTop()+document.documentElement.clientHeight/2-html.height()/2);
	html.css("left",$(document).scrollLeft()+document.documentElement.clientWidth/2-html.width()/2);
	
	$(window).resize(function(){
		$(".i-loading-cover").css("height",$(document).height());
		$(".i-loading-cover").css("width",$(document).width());
		html.css("top",$(document).scrollTop()+document.documentElement.clientHeight/2-html.height()/2);
		html.css("left",$(document).scrollLeft()+document.documentElement.clientWidth/2-html.width()/2);
	});
};

jQuery.loadComplete = function (){
	$(".i-loading-closable").remove();
}